import http from "@/utils/request";

export const GetHome = async () => await http.get("/api/index/index");

export const GetCatalog = async () => await http.post("/api/catalog/index");
export const GetCurrent = async (id) => await http.post(`/api/catalog/current?id=${id}`);

export const GetSpecial = async (page=1,size=10) => await http.get(`api/topic/list?page=${page}&size=${size}`);

export const getCart = async () => await http.get(`api/cart/index`)

export const getSearchIndex = async () => await http.get(`api/search/index`)

export const getSearchList = async (params) => await http.get(`api/goods/list?keyword=${params.keyword}&page=${params.page}&size=${params.size}&order=${params.order}&categoryId=${params.categoryId}&sort=${params.sort}`)

export const getGoodsDetail = async id => await http.get(`api/goods/detail?id=${id}`)
